package com.umer.pinban.adapter.customer;

import android.content.Context;
import android.widget.TextView;
import com.common.ui.recycleview.adapter.RecyclerviewBasicAdapter;
import com.common.ui.recycleview.base.ViewHolder;
import com.umer.pinban.R;
import com.umer.pinban.bean.customer.XiaoFeiRecordItemBean;
import java.util.List;

/**
 * 查看消费凭证
 */
public class CustomerLookXiaoFeiRecordAdapter extends RecyclerviewBasicAdapter<XiaoFeiRecordItemBean> {

    public CustomerLookXiaoFeiRecordAdapter(Context context, List<XiaoFeiRecordItemBean> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, XiaoFeiRecordItemBean xiaoFeiRecordItem, int position) {
        TextView tv1 = holder.getView(R.id.tv1);
        TextView tv2 = holder.getView(R.id.tv2);
        tv1.setText(xiaoFeiRecordItem.getName());
        if(xiaoFeiRecordItem.getUseNum()!=0){
            tv2.setText(xiaoFeiRecordItem.getUseNum()+"次");
        }
    }

}
